// run: $exec < input
#include <iostream>
#include <string>

std::string s1, s2;

int main()
{
	std::cin >> s1 >> s2;
	int l1 = s1.size();
	int l2 = s2.size();
	int ans = 0;
	for (int i = 0; i < l1; i++) {
		bool equal = true;
		for (int j = 0; j < l2; j++)
			if (s1[i + j] != s2[j]) { equal = false; break; }
		if (equal) { ans++; i = i + l2 - 1; }
	}
	std::cout << ans << '\n';
}

